﻿#ifndef BASECODEEDITOR_H
#define BASECODEEDITOR_H

#include "global/const.h"

#if USE_QSCI

#include <Qsci/qsciscintilla.h>

class QsciAPIs;

class BaseCodeEditor : public QsciScintilla

#else

#include <QTextEdit>

class BaseCodeEditor : public QTextEdit

#endif
{
    Q_OBJECT
public:
    explicit BaseCodeEditor(QWidget *parent = nullptr);

    QString code() const;

#if USE_QSCI
    virtual void setLexer(QsciLexer *lexer = 0) override;
#else
    virtual void setLexer(QsciLexer *lexer = 0);
#endif
};

#endif // BASECODEEDITOR_H
